<%@ page language="java" import="java.util.*" contentType="application/msword; charset=UTF-8" %>
<%@ include file="/static/include/taglib.jsp" %>
<%response.setHeader("Content-Disposition", "attachment; filename=" + java.net.URLEncoder.encode("ywkh.doc", "UTF-8"));%>
<!DOCTYPE html>
<html>
    <head>
        <meta name="viewport" content="width=device-width"/>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <title>队伍考核-关联单位</title>

        <script src="${ctxStatic}/js/jquery-1.8.3.min.js?v=2.0" type="text/javascript"></script>
        <script src="${ctxStatic}/layui/layui.all.js" type="text/javascript"></script>

    </head>
    <body>

          <h2>${title}</h2>

        <form class="layui-form" id="formedit" name="formedit" method="post"
              target="d41d8cd98f00b204e9800998ecf8427e">
            <iframe name="d41d8cd98f00b204e9800998ecf8427e" src="about:blank" style="display:none;"></iframe>
            <div class="indexcontent">
                <div class="selftable" id="selftable" style="overflow-x: scroll">
                    <table cellspacing="0" cellpadding="0" border="1" class="layui-table"
                           style="margin:0; ">
                        <thead>
                            <tr>

                                <th rowspan="2" colspan="2" style="width: 100px">被评单位</th>
                                <c:forEach var="cmap" items="${columt}" varStatus="idxStatus">
                                    <th colspan="${cmap.value}" style="text-align: center;width: 60px">${cmap.text}

                                    </th>

                                </c:forEach>
                                <th rowspan="2">总计</th>
                                <th class="orderScore" rowspan="3">排名</th>
                            </tr>

                            <tr>
                                <c:forEach var="itemth" items="${titleh}" varStatus="idxStatus">
                                    <th style="text-align: center">${itemth.uassingredients }
                                            <%----%>

                                    </th>
                                </c:forEach>
                            </tr>
                            <tr>
                                <td colspan="2">全局</td>
                                <c:forEach var="itemth" items="${titleh}" varStatus="idxStatus">
                                    <th  align="center" style="text-align: center">

                                        <span class="sum_${idxStatus.index+1}  sum">${itemth.sumscore} </span>


                                    </th>

                                </c:forEach>
                                <td class="allNum">

                                    <fmt:formatNumber type="number" value="${sumscore}" pattern="#.000"/>
                                </td>
                            </tr>
                        </thead>
                        <tbody>
                            <c:forEach var="item" items="${databody}" varStatus="idxStatus1">
                                <tr class="orginfo orginfo_${idxStatus1.index+1}">
                                    <c:if test="${item['rowspan']!=0 && item['rowspan']!=null}">
                                        <td rowspan="${item['rowspan']}" style="vertical-align: middle"
                                            valign="middle">${item['groupname']}</td>
                                    </c:if>

                                    <c:if test="${item['rowspan']==0&&item['groupid']==null}">
                                        <td style="vertical-align: middle"
                                            valign="middle"></td>
                                    </c:if>
                                    <td>
                                        <div style="width: 130px">${item['orgname']}</div>
                                    </td>
                                    <c:forEach var="itembody" items="${titleh}" varStatus="idxStatus">

                                        <td>

                                            <c:if test="${read == 1}">

                                                <span name="score_${item['orgid']}_${itembody.assindexid}"
                                                      class="  num_${idxStatus.index+1}"
                                                      data-index="${idxStatus.index}"
                                                      style="width: 60px"


                                                >${item[itembody.assindexidcolum]}</span>


                                            </c:if>
                                            <c:if test="${read == 0}">
                                                <input type="text" name="score_${item['orgid']}_${itembody.assindexid}"
                                                       autocomplete="off"
                                                       class="layui-input  num_${idxStatus.index+1}"
                                                       data-index="${idxStatus.index}"
                                                       style="width: 60px"
                                                       value="${item[itembody.assindexidcolum]}">
                                            </c:if>

                                        </td>

                                    </c:forEach>
                                    <td class="weight_sum_${idxStatus1.index+1}    group "
                                        groupId="${item['groupid']==null?item['orgid']:item['groupid']}">

                                        <fmt:formatNumber type="number" value="${item['sumscore']}" pattern="#.000"/>
                                         </td>
                                    <td class="orderScore">${item['orderindex']}</td>

                                </tr>
                            </c:forEach>

                        </tbody>
                    </table>
                </div>
            </div>

            <input type="hidden" id="hidRead" value="${read}"/>
        </form>

    </body>
</html>